package at.ac.tuwien.ifs.calendit.basis.gui;

import java.awt.Component;

import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

class JComponentButtonRenderer implements TableCellRenderer {
	  private TableCellRenderer __defaultRenderer;

	  public JComponentButtonRenderer(TableCellRenderer renderer) {
	    __defaultRenderer = renderer;
	  }

	  public Component getTableCellRendererComponent(JTable table, Object value,
							 boolean isSelected,
							 boolean hasFocus,
							 int row, int column)
	  {
	    if(value instanceof Component)
	      return (Component)value;
	    return __defaultRenderer.getTableCellRendererComponent(
		   table, value, isSelected, hasFocus, row, column);
	  }
	}

